inherited frmPaysOther: TfrmPaysOther
  Left = 301
  Top = 101
  Width = 878
  Height = 671
  HelpContext = 1162
  ActiveControl = ddSearch
  Caption = #1050#1086#1088#1088#1077#1082#1090#1080#1088#1086#1074#1082#1080
  Constraints.MinHeight = 600
  Constraints.MinWidth = 875
  FormStyle = fsMDIChild
  OldCreateOrder = True
  Visible = True
  OnCloseQuery = FormCloseQuery
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 617
    Width = 870
    inherited BitBtn1: TBitBtn
      Left = 667
      TabOrder = 1
    end
    inherited BitBtn2: TBitBtn
      Left = 769
      TabOrder = 2
    end
    object BitBtn3: TBitBtn
      Left = 551
      Top = 1
      Width = 111
      Height = 25
      Action = aDistribute
      Anchors = [akTop, akRight]
      Caption = #1056#1072#1089#1087#1088#1077#1076#1077#1083#1080#1090#1100
      TabOrder = 0
      Glyph.Data = {
        36040000424D3604000000000000360000002800000010000000100000000100
        2000000000000004000000000000000000000000000000000000FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00D2DFF800F4F4F600FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00C9C9CC00DADADD000392FB00069CFE00969CBD00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00F1F1F1002230
        A100000DEA009698B2002CB7FA0056FFFF0026B1FE00F3F3F500F8F5F5008572
        4D008C8B6500988B6900988B6800928A66008D8A6400949162002C2C81000004
        FF000002FF00605F6A003385F3006EB4F7005BAEFC00CFDEF800F6E7E40066E4
        A40071FFC40091FFCD0090FFCE007EFFC70072FFC30076FFC0000000C0000D15
        FF001319F80036758E0058B2A70041857D00BFBEC100FF00FF00F5E7E4006ADB
        9E0074FABF0096FBC80095FBC80082F8C10076F8BD007CFFBD000C11B8003F46
        FF004C52FF004146EE003639F0001E27E900B2B2BA00FF00FF00F5E7E40070DE
        A5007AFAC1009BFBCB009AFBCB0087F8C3007BF7BF0080FFC1003F669E006061
        FB008588FF00888BFF007A7EFF002326A200DCD9D900FF00FF00F6E8E6002FAD
        520088FFD000A1FBCF00A0FBCE008DFAC90084FCC90081F9C2007EFFC1003C61
        9C004B50BD005C60C800374AA80074A98200DBD7D700FF00FF00F4E9E600C190
        54000FC25B00B3FFE100A8FDD60071F0B5002EB14D0084FECC0085F9C60087FF
        C60097F8C90096ECC700A7FFD60077C98E00DAD7D700FF00FF00F2E9E600F99A
        7100CCA566002DC66B00A0FBD200369E3400FFAA7C0034AF4C008AFED10087F8
        C7009BFBCF00ABFDD500A5FFD60078C68E00DAD7D700FF00FF00F2E9E600EF9D
        7200FFB58D00BFA869003B9F3900FFB28E00FFB38A00F2AD7E0023B0490090FF
        D500A4FDD800B3FEDD00A9FFDA007AC68F00DAD7D700FF00FF00F2E8E500EFAF
        8E00FFC8AA00FFC7AB00FFC7AD00FFC7A900FFC6A900FFC7AB00EEBF9A0014B4
        4A007BD4960029A83F00BDFFE9007DC69200DAD7D700FF00FF00F2E8E400EFC1
        AC00FFDCCA00FFDAC700FFDAC700FFDAC700FFDAC700FFDAC700FFDCCB00E0D1
        B000A2C08700FED8C5004BB55B0081CA9A00DAD7D700FF00FF00F2E6E300F3DB
        D000FFFAF400FFF8F200FFF8F200FFF8F200FFF8F200FFF8F200FFF8F200FFF9
        F400FFFAF600FFF9F500F5F5E8005C964300D9D6D600FF00FF00FBFAF900C99B
        8B00D3AB9C00D2AA9B00D2AA9B00D2AA9B00D2AA9B00D2AA9B00D2AA9B00D2AA
        9B00D2AA9B00D2AA9B00D6AC9E00D3A39700FEFEFE00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
        FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
    end
  end
  inherited ToolBar1: TToolBar
    Top = 69
    Width = 870
    Height = 0
    Enabled = False
    inherited ToolButton1: TToolButton
      Enabled = False
    end
    inherited ToolButton2: TToolButton
      Enabled = False
    end
    inherited ToolButton3: TToolButton
      Enabled = False
    end
    inherited ToolButton4: TToolButton
      Enabled = False
    end
  end
  object GroupBox1: TGroupBox [2]
    Left = 0
    Top = 0
    Width = 870
    Height = 69
    Align = alTop
    Caption = ' '#1040#1076#1088#1077#1089' '
    TabOrder = 2
    DesignSize = (
      870
      69)
    object dbeAddress: TDBEditEh
      Left = 112
      Top = 18
      Width = 635
      Height = 19
      TabStop = False
      AlwaysShowBorder = True
      Anchors = [akLeft, akTop, akRight]
      Color = clInactiveCaptionText
      DataField = 'ADDRESS'
      DataSource = dsc_Address
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      Flat = True
      ParentFont = False
      ReadOnly = True
      TabOrder = 0
      Visible = True
    end
    object ddSearch: TBitBtn
      Left = 750
      Top = 17
      Width = 111
      Height = 44
      Action = aSearch
      Anchors = [akTop, akRight]
      Caption = #1055#1086#1080#1089#1082' (F5)'
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clMaroon
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
      TabOrder = 1
      Glyph.Data = {
        36060000424D3606000000000000360000002800000020000000100000000100
        1800000000000006000000000000000000000000000000000000FF00FFFF00FF
        FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
        00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FFFF00FFFF00FFFF00FF000000FF00FFFF00FFFF00FFFF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00
        0000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FFFF00FFFF00FF000000088EF1000000FF00FFFF00FFFF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00000094
        9494000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FFFF00FF0000007AFBFF02CBFD0073EF000000FF00FFFF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F4F4F4C6
        C6C6838383000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FF0000007CFAFF05BFFA05BFFA05BFFB006CEC000000FF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F3F3F3BCBCBCBB
        BBBBBCBCBC7E7E7E000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FF0000007DF8FF09B0F709B0F700000008B0F708B0F70163E9000000FF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F1F1F1AEAEAEAFAFAF00
        0000AFAFAFAEAEAE787878000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FF000000000000000000000000088EF1000000000000000000000000FF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000094
        9494000000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FFFF00FF0000007AFBFF02CBFD0073EF000000FF00FFFF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F4F4F4C7
        C7C7838383000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FF0000007CFAFF05BFFA05BFFA05BFFB006CEC000000FF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F3F3F3BBBBBBBC
        BCBCBCBCBC7E7E7E000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FF0000007DF8FF09B0F709B0F700000008B0F708B0F70163E9000000FF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F1F1F1AFAFAFAFAFAF00
        0000AEAEAEAFAFAF787878000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FF000000000000000000000000088EF1000000000000000000000000FF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000094
        9494000000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FFFF00FF0000007AFBFF02CBFD0073EF000000FF00FFFF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F4F4F4C6
        C6C6838383000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FF0000007CFAFF05BFFA05BFFA05BFFB006CEC000000FF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F3F3F3BCBCBCBB
        BBBBBCBCBC7E7E7E000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FF0000007DF8FF09B0F709B0F709B0F708B0F708B0F70163E9000000FF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF000000F1F1F1AEAEAEAFAFAFAF
        AFAFAFAFAFAFAFAF787878000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FF000000000000000000000000000000000000000000000000000000FF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF00000000000000000000000000
        0000000000000000000000000000FF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
        FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00
        FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF
        00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF}
      NumGlyphs = 2
    end
    object dbeClientName: TDBEditEh
      Left = 8
      Top = 42
      Width = 739
      Height = 19
      TabStop = False
      AlwaysShowBorder = True
      Anchors = [akLeft, akTop, akRight]
      Color = clInactiveCaptionText
      DataField = 'NAME'
      DataSource = dsc_Address
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      Flat = True
      ParentFont = False
      ReadOnly = True
      TabOrder = 2
      Visible = True
    end
    object DBEditEh1: TDBEditEh
      Left = 8
      Top = 18
      Width = 99
      Height = 19
      TabStop = False
      AlwaysShowBorder = True
      Color = clInactiveCaptionText
      DataField = 'G_LICSCHET'
      DataSource = dsc_Address
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      Flat = True
      ParentFont = False
      ReadOnly = True
      TabOrder = 3
      Visible = True
    end
  end
  object pSave: TPanel [3]
    Left = 0
    Top = 412
    Width = 870
    Height = 205
    Align = alBottom
    BevelOuter = bvNone
    TabOrder = 3
    DesignSize = (
      870
      205)
    object Label2: TLabel
      Left = 26
      Top = 9
      Width = 119
      Height = 20
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1057#1091#1084#1084#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label4: TLabel
      Left = 26
      Top = 40
      Width = 119
      Height = 20
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1055#1088#1080#1084#1077#1095#1072#1085#1080#1077
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label6: TLabel
      Left = 319
      Top = 9
      Width = 100
      Height = 20
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1044#1072#1090#1072
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label1: TLabel
      Left = 26
      Top = 71
      Width = 119
      Height = 20
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1058#1080#1087' '#1086#1087#1077#1088#1072#1094#1080#1080
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label9: TLabel
      Left = 26
      Top = 133
      Width = 119
      Height = 20
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1040#1075#1077#1085#1090
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object Label10: TLabel
      Left = 26
      Top = 102
      Width = 119
      Height = 20
      Alignment = taRightJustify
      AutoSize = False
      Caption = #1053#1072#1079#1085#1072#1095#1077#1085#1080#1077
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      ParentFont = False
    end
    object dbnePay: TDBNumberEditEh
      Left = 154
      Top = 6
      Width = 122
      Height = 26
      AlwaysShowBorder = True
      currency = False
      DisplayFormat = '#0.00'
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      Flat = True
      ParentFont = False
      TabOrder = 0
      Value = 0.000000000000000000
      Visible = True
      OnEnter = dbnePayEnter
      OnKeyPress = lcbManagersKeyPress
    end
    object dbeNote: TDBEditEh
      Left = 154
      Top = 37
      Width = 649
      Height = 26
      AlwaysShowBorder = True
      Anchors = [akLeft, akTop, akRight]
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      TabOrder = 2
      Visible = True
      OnKeyPress = lcbManagersKeyPress
    end
    object dteDocdate: TDBDateTimeEditEh
      Left = 428
      Top = 6
      Width = 121
      Height = 26
      AlwaysShowBorder = True
      AutoSize = False
      EditButton.Width = 15
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = [fsBold]
      Flat = True
      Kind = dtkDateEh
      ParentFont = False
      TabOrder = 1
      Visible = True
      OnEnter = dteDocdateEnter
      OnExit = dteDocdateExit
      OnKeyPress = lcbManagersKeyPress
    end
    object lcbOperType: TDBLookupComboboxEh
      Left = 154
      Top = 68
      Width = 649
      Height = 26
      AlwaysShowBorder = True
      Anchors = [akLeft, akTop, akRight]
      DropDownBox.Sizable = True
      EditButton.Width = 15
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      KeyField = 'CODE'
      ListField = 'PAY_NAME'
      ListSource = dsc_PayTypes
      ParentFont = False
      TabOrder = 3
      Visible = True
      OnChange = lcbOperTypeChange
      OnKeyPress = lcbManagersKeyPress
    end
    object lcbReason: TDBLookupComboboxEh
      Left = 154
      Top = 99
      Width = 649
      Height = 26
      AlwaysShowBorder = True
      Anchors = [akLeft, akTop, akRight]
      DropDownBox.Sizable = True
      DropDownBox.SpecRow.Visible = True
      EditButton.Width = 15
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      KeyField = 'CODE'
      ListField = 'NAME'
      ListSource = dsc_Reason
      ParentFont = False
      TabOrder = 4
      Visible = True
      OnKeyPress = lcbManagersKeyPress
    end
    object cbPeni: TDBCheckBoxEh
      Left = 154
      Top = 178
      Width = 173
      Height = 17
      AlwaysShowBorder = True
      Caption = #1043#1072#1089#1080#1090#1100' '#1076#1086#1083#1075' '#1087#1077#1085#1080
      Flat = True
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      TabOrder = 6
      ValueChecked = '1'
      ValueUnchecked = '0'
      Visible = False
      OnClick = cbPeniClick
    end
    object lcbAgents: TDBLookupComboboxEh
      Left = 154
      Top = 130
      Width = 649
      Height = 26
      AlwaysShowBorder = True
      Anchors = [akLeft, akTop, akRight]
      DropDownBox.Sizable = True
      DropDownBox.SpecRow.Visible = True
      EditButton.Width = 15
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -16
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      KeyField = 'ID'
      ListField = 'AGENT_NAME'
      ListSource = dsc_Agents
      ParentFont = False
      TabOrder = 5
      Visible = True
    end
    object cbRaspredDate: TDBCheckBoxEh
      Left = 154
      Top = 159
      Width = 407
      Height = 17
      AlwaysShowBorder = True
      Caption = #1056#1072#1089#1087#1088#1077#1076#1077#1083#1103#1090#1100' '#1087#1088#1086#1087#1086#1088#1094#1080#1086#1085#1072#1083#1100#1085#1086' '#1086#1078#1080#1076#1072#1077#1084#1086#1084#1091' '#1085#1072#1095#1080#1089#1083#1077#1085#1080#1102
      Flat = True
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      TabOrder = 7
      ValueChecked = '1'
      ValueUnchecked = '0'
      OnClick = cbPeniClick
    end
  end
  object Panel2: TPanel [4]
    Left = 0
    Top = 69
    Width = 870
    Height = 343
    Align = alClient
    BevelOuter = bvNone
    TabOrder = 4
    object pFilter: TPanel
      Left = 0
      Top = 0
      Width = 870
      Height = 35
      Align = alTop
      BevelInner = bvRaised
      BevelOuter = bvLowered
      TabOrder = 0
      object Label7: TLabel
        Left = 21
        Top = 4
        Width = 65
        Height = 26
        Alignment = taRightJustify
        Caption = #1046#1080#1083#1080#1097#1085#1072#1103' '#1086#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
        WordWrap = True
      end
      object Label8: TLabel
        Left = 359
        Top = 11
        Width = 69
        Height = 13
        Alignment = taRightJustify
        AutoSize = False
        Caption = #1055#1086#1089#1090#1072#1074#1097#1080#1082
      end
      object lcbManagers: TDBLookupComboboxEh
        Left = 99
        Top = 9
        Width = 256
        Height = 19
        AlwaysShowBorder = True
        DropDownBox.Sizable = True
        EditButtons = <>
        Flat = True
        KeyField = 'ID'
        ListField = 'NAME'
        ListFieldIndex = -1
        ListSource = dsc_Managers
        TabOrder = 0
        Visible = True
        OnChange = lcbManagersChange
        OnKeyPress = lcbManagersKeyPress
      end
      object lcbSuppliers: TDBLookupComboboxEh
        Left = 436
        Top = 9
        Width = 256
        Height = 19
        AlwaysShowBorder = True
        DropDownBox.Sizable = True
        EditButtons = <>
        Flat = True
        KeyField = 'ID'
        ListField = 'NAME'
        ListFieldIndex = -1
        ListSource = dsc_Suppliers
        TabOrder = 1
        Visible = True
        OnChange = lcbSuppliersChange
        OnKeyPress = lcbManagersKeyPress
      end
      object cbAbonIsNotActive: TDBCheckBoxEh
        Left = 704
        Top = 10
        Width = 161
        Height = 17
        Caption = #1054#1090#1086#1073#1088#1072#1078#1072#1090#1100' '#1079#1072#1082#1088#1099#1090#1099#1077' '#1051#1057
        Flat = True
        TabOrder = 2
        ValueChecked = 'True'
        ValueUnchecked = 'False'
      end
    end
    object dbgPay: TDBGridEh
      Left = 0
      Top = 35
      Width = 870
      Height = 308
      Align = alClient
      ColumnDefValues.EndEllipsis = True
      DataGrouping.GroupLevels = <>
      DataSource = dsc_MainPays
      EvenRowColor = clWindow
      Flat = True
      Font.Charset = RUSSIAN_CHARSET
      Font.Color = clWindowText
      Font.Height = -13
      Font.Name = 'Arial'
      Font.Style = []
      FooterColor = clWindow
      FooterFont.Charset = DEFAULT_CHARSET
      FooterFont.Color = clMaroon
      FooterFont.Height = -11
      FooterFont.Name = 'MS Sans Serif'
      FooterFont.Style = [fsBold]
      FooterRowCount = 1
      Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
      OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
      ParentFont = False
      RowDetailPanel.Color = clBtnFace
      SumList.Active = True
      TabOrder = 1
      TitleFont.Charset = DEFAULT_CHARSET
      TitleFont.Color = clWindowText
      TitleFont.Height = -11
      TitleFont.Name = 'MS Sans Serif'
      TitleFont.Style = []
      UseMultiTitle = True
      VTitleMargin = 5
      OnDblClick = dbgPayDblClick
      Columns = <
        item
          Checkboxes = True
          EditButtons = <>
          FieldName = 'TSELECT'
          Footer.ValueType = fvtStaticText
          Footers = <>
          MaxWidth = 30
          MinWidth = 30
          Width = 30
        end
        item
          EditButtons = <>
          FieldName = 'RSERVICE_SHORT_NAME'
          Footer.Value = #1048#1090#1086#1075#1086
          Footer.ValueType = fvtStaticText
          Footers = <>
          ReadOnly = True
          Width = 174
        end
        item
          EditButtons = <>
          FieldName = 'RSALDO'
          Footer.FieldName = 'RSALDO'
          Footer.ValueType = fvtSum
          Footers = <>
          ReadOnly = True
        end
        item
          EditButtons = <>
          FieldName = 'RPENI'
          Footer.FieldName = 'RPENI'
          Footer.ValueType = fvtSum
          Footers = <>
          ReadOnly = True
        end
        item
          EditButtons = <>
          FieldName = 'TPAY'
          Footer.FieldName = 'TPAY'
          Footer.ValueType = fvtSum
          Footers = <>
          ReadOnly = True
          Width = 91
        end
        item
          EditButtons = <>
          FieldName = 'TPENI'
          Footer.FieldName = 'TPENI'
          Footer.ValueType = fvtSum
          Footers = <>
          ReadOnly = True
          Width = 91
        end>
      object RowDetailData: TRowDetailPanelControlEh
      end
    end
  end
  inherited ActionList1: TActionList
    Images = MAIN.ImageList
    Left = 332
    Top = 8
    inherited aSave: TAction
      OnExecute = BitBtn1Click
    end
    inherited aCancel: TAction
      OnExecute = aCancelExecute
    end
    object aSearch: TAction
      Caption = #1055#1086#1080#1089#1082' (F5)'
      ShortCut = 116
      OnExecute = aSearchExecute
    end
    object aDistribute: TAction
      Caption = #1056#1072#1089#1087#1088#1077#1076#1077#1083#1080#1090#1100
      Hint = #1056#1072#1089#1087#1088#1077#1076#1077#1083#1080#1090#1100' '#1089#1091#1084#1084#1091' '#1087#1086' '#1086#1090#1084#1077#1095#1077#1085#1085#1099#1084' '#1091#1089#1083#1091#1075#1072#1084
      ImageIndex = 12
      OnExecute = dbnePayExit
    end
  end
  inherited PropStorage: TPropStorageEh
    Section = 'frmPaysOther'
  end
  object DSContainer: TDataSetsContainer
    Left = 296
    Top = 8
  end
  object dsc_Address: TDataSource
    DataSet = ds_Address
    Left = 204
    Top = 10
  end
  object ds_Address: TpFIBDataSet
    SelectSQL.Strings = (
      'select v.address, v.name, v.g_licschet, v.id'
      '  from v_abons v'
      '  where v.id = :pabonent_id')
    Transaction = CashierTrans
    Database = MAINDM.pMainDatabase
    Container = DSContainer
    Left = 172
    Top = 10
    poSQLINT64ToBCD = True
    oFetchAll = True
    object ds_AddressADDRESS: TFIBStringField
      FieldName = 'ADDRESS'
      Size = 245
      EmptyStrToNull = True
    end
    object ds_AddressNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_AddressG_LICSCHET: TFIBStringField
      FieldName = 'G_LICSCHET'
      EmptyStrToNull = True
    end
    object ds_AddressID: TFIBIntegerField
      FieldName = 'ID'
    end
  end
  object ds_Managers: TpFIBDataSet
    SelectSQL.Strings = (
      
        'select cast(-1 as integer) as id, cast('#39#1055#1086' '#1074#1089#1077#1084' '#1059#1050#39' as varchar(6' +
        '0)) as name, 0'
      '  from rdb$database r'
      'union'
      'select v.id, v.manag as name, 1'
      '  from dogovors d, rmanag v'
      '  where v.id = d.manag_id'
      '    and d.abonent_id = :pabonent_id'
      '    and v.closed_rs = 0'
      '  order by 3,2')
    Transaction = CashierTrans
    Database = MAINDM.pMainDatabase
    Container = DSContainer
    Left = 156
    Top = 70
    poSQLINT64ToBCD = True
    oFetchAll = True
    object ds_ManagersID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_ManagersNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dsc_Managers: TDataSource
    DataSet = ds_Managers
    Left = 188
    Top = 70
  end
  object ds_Suppliers: TpFIBDataSet
    SelectSQL.Strings = (
      
        'select cast(-1 as integer) as id, cast('#39#1055#1086' '#1074#1089#1077#1084' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1072#1084#39' as ' +
        'varchar(60)) as name, 0'
      '  from rdb$database r'
      'union'
      'select v.id, v.name, 1'
      '  from dogovors d, v_supplier v'
      '  where v.id = d.supplier_id'
      '    and d.abonent_id = :pabonent_id'
      '  order by 3,2')
    Transaction = CashierTrans
    Database = MAINDM.pMainDatabase
    Container = DSContainer
    Left = 440
    Top = 70
    poSQLINT64ToBCD = True
    oFetchAll = True
    object ds_SuppliersID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_SuppliersNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dsc_Suppliers: TDataSource
    DataSet = ds_Suppliers
    Left = 472
    Top = 70
  end
  object ds_MainPays: TpFIBDataSet
    UpdateSQL.Strings = (
      'update pays p'
      '  set p.summa = coalesce(summa, :TSUMMA),'
      '      p.summ_all = coalesce(summa, :TPAY),'
      '      p.summ_norm = coalesce(summa, :TPENI),'
      '      p.summ_exempts = coalesce(summa, :TOTHER),'
      '      p.import = coalesce(summa, :TSELECT)'
      'where p.id = -100'
      ''
      '')
    SelectSQL.Strings = (
      'SELECT'
      
        '    (case when '#39';'#39'||coalesce(:PDOG_STR, cast('#39#39' as varchar(1000)' +
        '))||'#39';'#39' containing '#39';'#39'||cast(p.RDOGOVOR_ID as varchar(10))||'#39';'#39' ' +
        'then 0 else 1 end) as TSELECT,'
      '    p.RSERVICE_SHORT_NAME,'
      '    p.RDOGOVOR_ID,'
      '    p.RSALDO,'
      '    p.RPENI,'
      '    p.RGROUP_ID,'
      '    p.RMETERPOLIT,'
      '    p.RIS_ACTIVE,'
      '    p.RMANAG_ID,'
      '    p.RSUPPLIER_ID,'
      
        '    coalesce(p.rsumma, 0) + coalesce(p.rpeni_pay, 0) + coalesce(' +
        'p.rother, 0) as TSUMMA,'
      '    coalesce(p.rsumma, 0) as TPAY,'
      '    coalesce(p.rpeni_pay, 0) as TPENI'
      
        'FROM proc_cashier_raspred_cash (:PABONENT_ID, :PSUPPLIER_ID, :PM' +
        'ANAG_ID,'
      '     :PSUMMA, :PDOG_STR, :PSUM_STR, :PPENI_STR, null, '
      '     :PPENI, :pdate, :pround) p'
      'ORDER BY p.RCALCTYPE, p.RSERVICE_NAME')
    BeforeOpen = ds_MainPaysBeforeOpen
    Transaction = CashierTrans
    Database = MAINDM.pMainDatabase
    Container = DSContainer
    Left = 80
    Top = 154
    poSQLINT64ToBCD = True
    oFetchAll = True
    object ds_MainPaysTSELECT: TFIBIntegerField
      Alignment = taCenter
      DisplayLabel = ' '
      FieldName = 'TSELECT'
      MaxValue = 1
    end
    object ds_MainPaysRSERVICE_SHORT_NAME: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      FieldName = 'RSERVICE_SHORT_NAME'
      Size = 30
      EmptyStrToNull = True
    end
    object ds_MainPaysRDOGOVOR_ID: TFIBIntegerField
      FieldName = 'RDOGOVOR_ID'
    end
    object ds_MainPaysRSALDO: TFIBBCDField
      DisplayLabel = #1057#1072#1083#1100#1076#1086
      FieldName = 'RSALDO'
      DisplayFormat = '#,##0.00'
      EditFormat = '0.00'
      Size = 2
      RoundByScale = True
    end
    object ds_MainPaysRPENI: TFIBBCDField
      DisplayLabel = #1055#1077#1085#1080
      FieldName = 'RPENI'
      DisplayFormat = '#,##0.00'
      EditFormat = '0.00'
      Size = 2
      RoundByScale = True
    end
    object ds_MainPaysRGROUP_ID: TFIBIntegerField
      FieldName = 'RGROUP_ID'
    end
    object ds_MainPaysRMETERPOLIT: TFIBSmallIntField
      FieldName = 'RMETERPOLIT'
    end
    object ds_MainPaysRIS_ACTIVE: TFIBSmallIntField
      FieldName = 'RIS_ACTIVE'
    end
    object ds_MainPaysRMANAG_ID: TFIBIntegerField
      FieldName = 'RMANAG_ID'
    end
    object ds_MainPaysRSUPPLIER_ID: TFIBIntegerField
      FieldName = 'RSUPPLIER_ID'
    end
    object ds_MainPaysTSUMMA: TFIBBCDField
      DisplayLabel = #1057#1091#1084#1084#1072' '#1074#1089#1077#1075#1086
      FieldName = 'TSUMMA'
      DisplayFormat = '#,##0.00'
      EditFormat = '0.00'
      Size = 2
      RoundByScale = True
    end
    object ds_MainPaysTPAY: TFIBBCDField
      DisplayLabel = #1050#1086#1088#1088#1077#1082#1090#1080#1088#1086#1074#1082#1072' '#1089#1072#1083#1100#1076#1086
      FieldName = 'TPAY'
      DisplayFormat = '#,##0.00'
      EditFormat = '0.00'
      Size = 2
      RoundByScale = True
    end
    object ds_MainPaysTPENI: TFIBBCDField
      DisplayLabel = #1050#1086#1088#1088#1077#1082#1090#1080#1088#1086#1074#1082#1072' '#1087#1077#1085#1080
      FieldName = 'TPENI'
      DisplayFormat = '#,##0.00'
      EditFormat = '0.00'
      Size = 2
      RoundByScale = True
    end
  end
  object dsc_MainPays: TDataSource
    DataSet = ds_MainPays
    Left = 112
    Top = 154
  end
  object CashierTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 412
    Top = 196
  end
  object PayTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    Left = 532
    Top = 440
  end
  object QPay: TpFIBQuery
    Transaction = PayTrans
    Database = MAINDM.pMainDatabase
    SQL.Strings = (
      'SELECT'
      '    RECCNT'
      'FROM'
      '    PROC_INSERT_OTHER(:DOGOVOR_ID,'
      '    :P_TYPE,'
      '    :NOTE,'
      '    :SUMMA,'
      '    :DOCDATE,'
      '    null,'
      '    null,'
      '    null,'
      '    null,'
      '    :PTARGET,'
      '    :PAGENT,'
      '    null,'
      '    null,'
      '    :psupplier_id,'
      '    :pmanag_id) ')
    Left = 532
    Top = 472
    qoStartTransaction = True
  end
  object ds_PayTypes: TpFIBDataSet
    UpdateSQL.Strings = (
      ''
      '')
    SelectSQL.Strings = (
      'select pt.code, pt.pay_name,'
      
        '       iif (exists (select 1 from vw_traits v where v.p_type = p' +
        't.code and v.code = '#39'PAYS'#39'), 1, 0) as pay'
      '  from pay_types pt'
      '  where pt.can_manual = 1'
      '  order by pt.pay_name')
    Transaction = CashierTrans
    Database = MAINDM.pMainDatabase
    Container = DSContainer
    Left = 200
    Top = 446
    poSQLINT64ToBCD = True
    oFetchAll = True
    object ds_PayTypesCODE: TFIBIntegerField
      FieldName = 'CODE'
    end
    object ds_PayTypesPAY_NAME: TFIBStringField
      FieldName = 'PAY_NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_PayTypesPAY: TFIBIntegerField
      FieldName = 'PAY'
    end
  end
  object dsc_PayTypes: TDataSource
    DataSet = ds_PayTypes
    Left = 232
    Top = 446
  end
  object ds_Agents: TpFIBDataSet
    UpdateSQL.Strings = (
      'update pays p'
      '  set p.summa = coalesce(summa, :TSUMMA),'
      '      p.summ_all = coalesce(summa, :TPAY),'
      '      p.summ_norm = coalesce(summa, :TPENI),'
      '      p.saldo_gorod = coalesce(summa, :TOTHER),'
      '      p.import = coalesce(summa, :TSELECT)'
      'where p.id = -100'
      ''
      '')
    SelectSQL.Strings = (
      'SELECT ID, AGENT_NAME, CODE'
      '  FROM AGENTS'
      '  where id > 0 '
      '  order by AGENT_NAME'
      '')
    Transaction = CashierTrans
    Database = MAINDM.pMainDatabase
    Container = DSContainer
    Left = 200
    Top = 510
    poSQLINT64ToBCD = True
    oFetchAll = True
    object ds_AgentsID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_AgentsAGENT_NAME: TFIBStringField
      FieldName = 'AGENT_NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_AgentsCODE: TFIBIntegerField
      FieldName = 'CODE'
    end
  end
  object dsc_Agents: TDataSource
    DataSet = ds_Agents
    Left = 232
    Top = 510
  end
  object ds_Reason: TpFIBDataSet
    UpdateSQL.Strings = (
      'update pays p'
      '  set p.summa = coalesce(summa, :TSUMMA),'
      '      p.summ_all = coalesce(summa, :TPAY),'
      '      p.summ_norm = coalesce(summa, :TPENI),'
      '      p.saldo_gorod = coalesce(summa, :TOTHER),'
      '      p.import = coalesce(summa, :TSELECT)'
      'where p.id = -100'
      ''
      '')
    SelectSQL.Strings = (
      'SELECT r.CODE, r.NAME'
      'FROM RPTARGET r'
      'where r.P_TYPE = :p_type'
      'Order by Name'
      ''
      '')
    Transaction = CashierTrans
    Database = MAINDM.pMainDatabase
    Container = DSContainer
    Left = 200
    Top = 478
    poSQLINT64ToBCD = True
    oFetchAll = True
    object ds_ReasonCODE: TFIBIntegerField
      FieldName = 'CODE'
    end
    object ds_ReasonNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dsc_Reason: TDataSource
    DataSet = ds_Reason
    Left = 232
    Top = 478
  end
  object qCalcPeni: TpFIBQuery
    Transaction = PayTrans
    Database = MAINDM.pMainDatabase
    SQL.Strings = (
      'SELECT'
      '    1'
      'FROM'
      '    PROC_DOGOVOR_CALC_PENI(:PDOGOVOR_ID,'
      '    :PDATE,'
      '    1) ')
    Left = 532
    Top = 504
    qoStartTransaction = True
  end
end
